<script type="text/javascript">


function validate(rel)
{
	jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
		if(r==true){

			
			var url = "/admin/hotel/delete/hotel_id/"+rel; 
		
			$(location).attr('href',url);

		}
		else
		{
		}
	});
}


function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;
}

</script>




<?php         
$this->title = "News Letters";
$this->headTitle($this->title);
?>
<p><a href="<?php echo $this->url(array('controller'=>'hotel', 
        'action'=>'add'));?>">Add New HOTEL</a></p>
<table id="box-table-a">
<tr>
    <th>Hotel Title</th>
    <th>Hotel City</th>
     <th>Hotel Country</th>
     <th>Is enabled</th>
    <th>Action</th>
  
</tr>
<?php foreach($this->Hotel_arr as $hotel) : ?>
<?php  //PRINT_R($hotel);exit;?>
<?php // echo ($hotel[0][0]);exit;?>
<tr>
    <td><?php echo  $hotel['hotel_title'];?></td>
    <td><?php echo $hotel['hotel_city'] ;?></td>
    <td><?php echo $hotel['hotel_country'] ;?></td>
    <td><?php echo $hotel['is_Enabled'] ;?></td>
    <td>
        <a href="<?php echo $this->url(array('controller'=>'hotel', 
            'action'=>'edit', 'hotel_id'=>$hotel['hotel_id']));?>">Edit</a>
        <a onclick="validate(this.rel)" id="confirm_button" href="#" rel="<?php echo $hotel['hotel_id'] ;?>" >Delete</a>
        <a  id="confirm_button" href="<?php echo $this->url(array('controller'=>'hotel', 
            'action'=>'assignroomcats', 'hotel_id'=>$hotel['hotel_id']));?>" >Assign roomcats</a>
        <a  id="confirm_button" href="<?php echo $this->url(array('controller'=>'rates', 
            'action'=>'index', 'hotel_id'=>$hotel['hotel_id']));?>" >Assign rates</a>
    </td>
</tr>
<?php endforeach; ?>
</table>
